"The Matchbox" by Al. the story headline is "An Inform 7 Source Code Example". use full-length room descriptions. release along with a website and the source text. Section 1 - The Components Start Room is a room. "You're back in that old exitless starting room.". a torch is in the start room. understand "wooden" or "wood" or "club" or "rags" or "bunch of" or "bunch" or "bunch of rags" as torch. the torch can be either lit or not lit. the torch is not lit. the description is "The torch is nothing more than a plain wooden club wrapped at one end with a bunch of rags and it is currently [if lit] lit [otherwise]not lit.". instead of taking the matchbox: move the matchbox to the player; say "you've taken the box.". instead of taking the torch: move the torch to the player; say "You've now got the torch.". instead of inserting the torch into the matchbox: say "The torch won't fit!". a matchbox is in the start room. the matchbox is a closed openable container. the description of the matchbox is "This is a very colorful matchbox with a picture of a match on it.". understand "box" as matchbox. Section 2 - The Operations After opening the matchbox: say "You open the matchbox. You count [quantity of collection] matches inside."; stop the action. instead of searching the matchbox: say "You see [quantity] matches inside.". sticks is a kind of thing. sticks has a number called quantity. a match is a thing in the matchbox. the collection is a thing in the Start Room with the printed name "matches". Understand "matches" as the collection. the collection is scenery. the collection is sticks with quantity 3. the match can be either lit or not lit. the match is not lit. the description of the match is "This is a very colorful match which will last exactly 10 turns before burning out or you can extinguish it anytime before that. It is currently [if lit]lit [otherwise]unlit.". instead of taking the match: if the quantity of collection > 0 begin; move the match to the player; decrease the quantity of the collection by 1; say "you remove a match from the matchbox. Matches left in the matchbox: [quantity of collection]"; stop the action; end if; [otherwise] say "You're out of matches.". counting is an action applying to one thing. understand "count [something]" as counting. instead of counting the collection: say "You have [quantity] matches left.". striking is an action applying to one thing. understand "strike [something]" or "ignite [something]" as striking. instead of burning the match: say "Try striking the match instead.". instead of striking the torch: say "You can only strike the torch.". check striking the match: if the match is not in the player, say "You ain't got the match." instead. check striking the match: if the torch is lit, say "Since the torch is lit, you don't need to do that." instead. check striking the match: if the match is lit, say "The match is already lit." instead. carry out striking the match: if the match is not lit, now the match is lit; say "You strike a match." instead. instead of inserting the match into the matchbox when the match is not lit: now the match is in the matchbox; increase the quantity of the collection by 1; say "you replace the unlit match back in the box.". instead of inserting the match into the matchbox when the match is lit: say "You burn yourself to death!"; end the game in death. check burning the torch when the matchbox is closed: say "You have nothing to light the torch with." instead. check burning the torch when the torch is lit: say "The torch is already lit." instead. check burning the torch when the match is not lit: say "the match ain't lit!" instead. check burning the torch: if the match is lit and the torch is not lit, now the torch is lit; now the match is not lit; move the match to the matchbox; say "You light the torch and the match automatically extinguishes itself." instead. extinguishing is an action applying to one thing. understand "douse [something]" or "ext [something]" or "extinguish [something]" or "put out [something]" or "put [something] out" as extinguishing. carry out extinguishing the match: if the match is not lit, say "the match is already extinguished.". carry out extinguishing the match: if the match is lit, now the match is not lit; now the match is in the matchbox; say "You douse the match and it evaporates into the ether.". check extinguishing the torch: if the torch is not lit, say "the torch is already extinguished." instead. check extinguishing the torch: if the torch is lit, now the torch is not lit; say "You extinguish the torch." instead. test me with "open box/take match/strike match/light torch/douse match/ take match/count matches/put match in matchbox/take match/ext torch/strike match/ put match in matchbox".